class CreateIlogs < ActiveRecord::Migration
  def self.up
    create_table :ilogs do |t|
      t.timestamp :created_at
      t.integer :user_id
      t.integer :which_revisit
      t.integer :pages_per_visit
      t.string :time_on_site
      t.integer :no_of_clicks
      t.integer :no_of_bets
      t.integer :no_of_comments
      t.integer :no_of_accept
      t.integer :days_since_1st_visit
      t.integer :days_since_last_visit
      t.integer :total_bets
      t.float :current_streak
      t.float :best_streak
      t.integer :invite_via_earn
      t.integer :invite_via_challenge
      t.integer :buy_amt
      t.integer :reward_amt

      t.timestamps
    end
      add_index :ilogs,:user_id
      add_index :ilogs,:created_at
    
  end

  def self.down
    drop_table :ilogs
  end
end
